home *** CD-ROM | disk | FTP | other *** search
- AUTOMATON*
-
- Demon
-
- Devised by J E Connett, this produces regions of colour which grow out from
- an initial soup, eating up their surroundings & in time usually develop
- into spirals (called demons) which dominate the whole region. When prompted
- try 15 as the total numer of states. The Moore neighbourhood is used. A
- window 100x100 should be big enough to ensure spirals will form (by about
- generation 270).
-
- INITIALISATION*
-
- 10DEF PROCdo
- 20*SetEval wrap on
- 30INPUT '"number of states";n%
- 40OSCLI("SetEval n "+STR$n%)
- 50ENDPROC
-
- SCREEN*
-
- 10DEF PROCdo
- 20DIM buf% 256:SYS "OS_ReadVarVal","n",buf%,256
- 30PROCsoup(35,!buf%,1)
- 40ENDPROC
-
- CODE*
-
- ( READ_NEIG
- TM CELL - DUP 1 = IF (TM ==) [1-<n>] = IF (TM ==)
- ML CELL - DUP 1 = IF (ML ==) [1-<n>] = IF (ML ==)
- MR CELL - DUP 1 = IF (MR ==) [1-<n>] = IF (MR ==)
- BM CELL - DUP 1 = IF (BM ==) [1-<n>] = IF (BM ==)
- CELL == )
-
- END*